Repository navigation
Show how to find the credentials your data uses that the vocabulary lacks - #1515
Merged
Merged
Conversation
…lary lacks A subsection of policy.rst's 'Credentials the vocabulary doesn't list': parse, keep comma names whose family came out two or more words long, count their given names, and add the credentials at the top with Lexicon.add(kind='credential'). It also says that a suffix-or-name report marks a credential weighed against a name, and that an unlisted mixed-case word carries none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scope the no-report claim to a word standing alone after the comma (a word behind a listed credential is read and reported); say an added word is read wherever it stands, with a doctest line; soften 'the top of the count' for data rich in two-word surnames; import what the block uses; rename its loop variables; link the new label from the section's intro and from customize.rst's Adding a word. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A docs-only recipe for finding the credentials a caller's data uses that the vocabulary does not list.
Where it goes and why
It goes in
docs/policy.rst, as a subsection "Finding the credentials your data uses" at the end of "Credentials the vocabulary doesn't list" (:ref:labelfinding-missing-credentials). That section is where a reader lands after finding a credential read as a given name: it explains the two shapes the parser already reads a credential by (dotted, all caps), and this recipe covers what neither shape reaches. Neithershapes.rstnorusage.rstholds a credentials section. Adding words itself stays in customize.rst's "Adding a word", which the recipe links.The recipe
A numbered list of four steps, then a doctest on invented names:
Lexicon.add(word, kind="credential")and build aParseron that lexicon.The section says that the count finds the comma shape, and that an added word is read as a credential after a comma and where it ends a name with no comma (
Ana Ruiz Paz PhDc), not earlier in the name. A second doctest shows that asuffix-or-namereport marks a credential weighed against a name (Ana Ruiz Paz, XYZ, and an unlisted word behind a listed credential,Ana Ruiz Paz, PhD PhDc), while a mixed-case word opening the part after the comma carries none (Ana Ruiz Paz, PhDc). The new label is linked from the section's intro and from customize.rst's "Adding a word".The example words are
PhDcandPharm-D. Both are mixed-case credentials that the mixed-case credential shape under measurement would still not read (a capital only inside the word; a hyphenated word), so the example stays true if that shape lands.Checks
uv run sphinx-build -q -b doctest docs <tmp>: 0 failures.-b html: no output.-W error, prints what the doctest shows. It type-checks under the project's mypy config (Counter[str]annotated, as a reader under mypy would write it).uv run python tools/docs_scan.py policy.rst: nothing in the new section; the one finding is an older paragraph at line 534.Reviews
9a5a452d:45936e85; its two wording nits taken in45936e85and650978f8.🤖 Generated with Claude Code